# -*- encoding:utf-8 -*-

"""
此配置文件维护颜色以及类索引对应关系
color_key_dic：以颜色值为key
cls_num_key_dic: 以类索引为key
"""

color_key_dic = {
    "wf_small": {
        (0, 0, 0): {"cls_num": 0, "cls": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "background"},
        (128, 0, 0): {"cls_num": 1, "cls": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "road"},
        (0, 255, 0): {"cls_num": 2, "cls": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "residence"},
        (128, 128, 0): {"cls_num": 3, "cls": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "industry"},
        (0, 0, 128): {"cls_num": 4, "cls": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], "label": "greenland"},
        (128, 0, 128): {"cls_num": 5, "cls": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], "label": "uncompleted"},
        (0, 128, 128): {"cls_num": 6, "cls": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], "label": "forest"},
        (128, 128, 128): {"cls_num": 7, "cls": [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], "label": "playground"},
        (64, 0, 0): {"cls_num": 8, "cls": [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], "label": "waterbody"},
        (192, 0, 0): {"cls_num": 9, "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], "label": "village"},
        (64, 128, 0): {"cls_num": 10, "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], "label": "service"},
        (128, 64, 0): {"cls_num": 11, "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], "label": "farmland"},
        (192, 128, 0): {"cls_num": 12, "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], "label": "others"}
    },
    "mlw": {
        (0, 0, 0): {"label": "Background", "cls": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cls_num": 0},
        (75, 0, 130): {"label": "Residence", "cls": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cls_num": 1},
        (255, 215, 0): {"label": "Industry", "cls": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], "cls_num": 2},
        (0, 0, 128): {"label": "Greenland", "cls": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], "cls_num": 3},
        (128, 128, 0): {"label": "Bareland", "cls": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], "cls_num": 4},
        (0, 128, 128): {"label": "Forest", "cls": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], "cls_num": 5},
        (72, 209, 204): {"label": "Waterbody", "cls": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], "cls_num": 6},
        (255, 0, 0): {"label": "Village", "cls": [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], "cls_num": 7},
        (34, 139, 34): {"label": "Service", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], "cls_num": 8},
        (160, 82, 45): {"label": "Farmland", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], "cls_num": 9},
        (255, 0, 255): {"label": "Other", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], "cls_num": 10},
        (128, 0, 0): {"label": "Road", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], "cls_num": 11}
    },

    "m_to_w": {
        (75, 0, 130): (0, 255, 0),
        (255, 215, 0): (128, 128, 0),
        (0, 0, 128): (0, 0, 128),
        (128, 128, 0): (128, 0, 128),
        (0, 128, 128): (0, 128, 128),
        (72, 209, 204): (64, 0, 0),
        (255, 0, 0): (192, 0, 0),
        (34, 139, 34): (64, 128, 0),
        (160, 82, 45): (128, 64, 0),
        (255, 0, 255): (192, 128, 0),
        (128, 0, 0): (128, 0, 0),
        (0, 0, 0): (0, 0, 0)

    }
}

cls_num_key_dic = {
    "wf_small": {
        0: {"color": (0, 0, 0), "cls": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "background"},
        1: {"color": (128, 0, 0), "cls": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "road"},
        2: {"color": (0, 255, 0), "cls": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "residence"},
        3: {"color": (128, 128, 0), "cls": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], "label": "industry"},
        4: {"color": (0, 0, 128), "cls": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], "label": "greenland"},
        5: {"color": (128, 0, 128), "cls": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], "label": "uncompleted"},
        6: {"color": (0, 128, 128), "cls": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], "label": "forest"},
        7: {"color": (128, 128, 128), "cls": [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], "label": "playground"},
        8: {"color": (64, 0, 0), "cls": [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], "label": "waterbody"},
        9: {"color": (192, 0, 0), "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], "label": "village"},
        10: {"color": (64, 128, 0), "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], "label": "service"},
        11: {"color": (128, 64, 0), "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], "label": "farmland"},
        12: {"color": (64, 128, 128), "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], "label": "other"}
    },
    "mlw": {
        0: {"label": "Road", "cls": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "color": (128, 0, 0)},
        1: {"label": "Residence", "cls": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "color": (75, 0, 130)},
        2: {"label": "Industry", "cls": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], "color": (255, 215, 0)},
        3: {"label": "Greenland", "cls": [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], "color": (0, 0, 128)},
        4: {"label": "Bareland", "cls": [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], "color": (128, 128, 0)},
        5: {"label": "Forest", "cls": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], "color": (0, 128, 128)},
        6: {"label": "Waterbody", "cls": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], "color": (72, 209, 204)},
        7: {"label": "Village", "cls": [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], "color": (255, 0, 0)},
        8: {"label": "Service", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], "color": (34, 139, 34)},
        9: {"label": "Farmland", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], "color": (160, 82, 45)},
        10: {"label": "Other", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], "color": (255, 0, 255)},
        11: {"label": "Background", "cls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], "color": (0, 0, 0)}
    }
}


if __name__ == "__main__":
    pass
